<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core">

    <ui:composition template="/template.xhtml">
        <ui:define name="title">
            <h:outputText value="#{bundle.EditStopsTitle}"></h:outputText>
        </ui:define>
        <ui:define name="body">
            <h:panelGroup id="messagePanel" layout="block">
                <h:messages errorStyle="color: red" infoStyle="color: green" layout="table"/>
            </h:panelGroup>
            <h:form>
                <h:panelGrid columns="2">
                    <h:outputLabel value="#{bundle.EditStopsLabel_stopId}" for="stopId" />
                    <h:inputText id="stopId" value="#{stopsController.selected.stopId}" title="#{bundle.EditStopsTitle_stopId}" required="true" requiredMessage="#{bundle.EditStopsRequiredMessage_stopId}"/>
                    <h:outputLabel value="#{bundle.EditStopsLabel_stopCode}" for="stopCode" />
                    <h:inputText id="stopCode" value="#{stopsController.selected.stopCode}" title="#{bundle.EditStopsTitle_stopCode}" />
                    <h:outputLabel value="#{bundle.EditStopsLabel_stopName}" for="stopName" />
                    <h:inputText id="stopName" value="#{stopsController.selected.stopName}" title="#{bundle.EditStopsTitle_stopName}" required="true" requiredMessage="#{bundle.EditStopsRequiredMessage_stopName}"/>
                    <h:outputLabel value="#{bundle.EditStopsLabel_stopDesc}" for="stopDesc" />
                    <h:inputText id="stopDesc" value="#{stopsController.selected.stopDesc}" title="#{bundle.EditStopsTitle_stopDesc}" />
                    <h:outputLabel value="#{bundle.EditStopsLabel_stopLat}" for="stopLat" />
                    <h:inputText id="stopLat" value="#{stopsController.selected.stopLat}" title="#{bundle.EditStopsTitle_stopLat}" required="true" requiredMessage="#{bundle.EditStopsRequiredMessage_stopLat}"/>
                    <h:outputLabel value="#{bundle.EditStopsLabel_stopLon}" for="stopLon" />
                    <h:inputText id="stopLon" value="#{stopsController.selected.stopLon}" title="#{bundle.EditStopsTitle_stopLon}" required="true" requiredMessage="#{bundle.EditStopsRequiredMessage_stopLon}"/>
                    <h:outputLabel value="#{bundle.EditStopsLabel_zoneId}" for="zoneId" />
                    <h:inputText id="zoneId" value="#{stopsController.selected.zoneId}" title="#{bundle.EditStopsTitle_zoneId}" required="true" requiredMessage="#{bundle.EditStopsRequiredMessage_zoneId}"/>
                    <h:outputLabel value="#{bundle.EditStopsLabel_stopUrl}" for="stopUrl" />
                    <h:inputText id="stopUrl" value="#{stopsController.selected.stopUrl}" title="#{bundle.EditStopsTitle_stopUrl}" />
                    <h:outputLabel value="#{bundle.EditStopsLabel_locationType}" for="locationType" />
                    <h:inputText id="locationType" value="#{stopsController.selected.locationType}" title="#{bundle.EditStopsTitle_locationType}" />
                    <h:outputLabel value="#{bundle.EditStopsLabel_parentStation}" for="parentStation" />
                    <h:inputText id="parentStation" value="#{stopsController.selected.parentStation}" title="#{bundle.EditStopsTitle_parentStation}" />
                </h:panelGrid>
                <h:commandLink action="#{stopsController.update}" value="#{bundle.EditStopsSaveLink}"/>
                <br />
                <br />
                <h:commandLink action="View" value="#{bundle.EditStopsViewLink}" immediate="true"/>
                <br />
                <h:commandLink action="#{stopsController.prepareList}" value="#{bundle.EditStopsShowAllLink}" immediate="true"/>
                <br />
                <br />
                <h:commandLink value="#{bundle.EditStopsIndexLink}" action="/index" immediate="true" />
            </h:form>
        </ui:define>
    </ui:composition>

</html>
